1. Field of the Present Disclosure
The present disclosure relates to an image processing apparatus.
2. Description of the Related Art
A ruled line detecting method generates a reduced image from an original image, and detects a connecting component of black pixels in the generated reduced image so that the connecting component corresponds to a ruled line in the original image.
When reducing an original image, the original image is usually reduced in a horizontal direction and a vertical direction at the same time, and a pixel value of a pixel in the reduced image is determined from pixel values of pixels in a window having a predetermined size (e.g. 2 pixels×2 pixels) in the original image.
For example, a pixel value of a pixel in the reduced image is set as an average value of the pixel values of the pixels in the window in the original image. Further, for example, if the original image is a binary image, then a pixel value of a pixel in the reduced image is set as a logical sum of the pixel values of the pixels in the window in the original image.
When a pixel value of a pixel in the reduced image is set as an average value of the pixel values of the pixels in the window in the original image, if the reduced image includes connecting pixels corresponding to a ruled line that is a thin line of one pixel width in the original image, then the connecting pixels sometimes improperly get a low density (i.e. improperly gets a high luminance value), and consequently the connecting pixels in the reduced image are sometimes not correctly detected and therefore the ruled line in the original image is sometimes not correctly detected.
Further, when a pixel value of a pixel in the reduced image is set as a logical sum of the pixel values of the pixels in the window in the original image, an improper pattern sometimes appears as connecting pixels in the reduced image independently of the ruled line in the original image.